/**
 * 页面整体控制器 
 * meiqm
 */


/**
 * @author meiqm
 * @param form
 * @return
 */
function disableComp(form){
	if(null == form || typeof form == 'undefined'){
		return;
	}
	
	var tempEL;
	var tempNodeName;
	for(var i = 0;i < form.all.length;i++){
		tempEL = form.all[i];
		
		tempNodeName = tempEL.nodeName;
		if(tempNodeName == "INPUT" && tempEL.name != 'return'){
			tempEL.disabled = true;
			tempEL.readOnly = true;
		}else if(tempNodeName == "SELECT"){
			tempEL.disabled = true;
		}else if(tempNodeName == "TEXTAREA"){
			tempEL.disabled = true;
		}else if(tempNodeName == "A"){
			tempEL.disabled = true;
			tempEL.href = "javascprit:void(0)";
			tempEL.onclick = function(e){
				e = window.event || e;
				if(e.preventDefault){
					e.preventDefault();
				}else{
					e.returnValue =false;
				}
			};
		}else if (tempNodeName == "IMG"){
			tempEL.disabled = true;
		}
	}
}